//
//  LGOrderConfirmFooter.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2025/2/28.
//

#import "LGOrderConfirmFooter.h"
@interface LGOrderConfirmFooter()
/**   */
@property (nonatomic , strong)UIButton *actionBtn;

@end

@implementation LGOrderConfirmFooter
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.actionBtn = [UIButton buttonWithTitle:@"加载更多" titleFont:LGFont(16) textColor:@"#282828" frame:CGRectMake(0, 0, Screen_W, viewPix(40))];
        [self.actionBtn addTarget:self action:@selector(requestMoreData) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:self.actionBtn];
        
        [self.actionBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.bottom.right.equalTo(self);
        }];
    }
    return self;
}

-(void)setSection:(NSInteger)section{
    _section = section;
}

-(void)setModel:(LGOrderConfirmModel *)model{
    _model = model;
    
}

-(void)requestMoreData{
    if (self.delegate && [self.delegate respondsToSelector:@selector(requestMoreDataWithModel:section:)]) {
        [self.delegate requestMoreDataWithModel:self.model section:self.section];
    }
}

@end
